<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<h1 class="layout">
    <logic:empty name="timeValue" property="timeId">
        Create
    </logic:empty>
    <logic:notEmpty name="timeValue" property="timeId">
        Edit
    </logic:notEmpty>
    Time
</h1>

<html:errors/>

<html:form action="time.do?method=timeEdit" method="post">
    <html:hidden name="timeActionForm" property="taskId"/>
    <table class="layout">
        <tr>
            <th class="layout">Description:</th>
            <td class="layout"><html:textarea name="timeValue" property="description" cols="60" rows="10"/></td>
        </tr>
        <tr>
            <th class="layout">% Complete:</th>
            <td class="layout">
                <html:select name="timeActionForm" property="percentageComplete">
                    <html:options collection="completePairs" property="integer" labelProperty="string"/>
                </html:select>
            </td>
        </tr>
        <tr>
            <th class="layout">Remaining Duration:</th>
            <td class="layout">
                <html:select name="timeActionForm" property="durationDays">
                    <html:options collection="durationDays" property="integer" labelProperty="string"/>
                </html:select>day:<html:select name="timeActionForm" property="durationHours">
                    <html:options collection="durationHours" property="integer" labelProperty="string"/>
                </html:select>hr:<html:select name="timeActionForm" property="durationMins">
                    <html:options collection="minutes" property="integer" labelProperty="string"/>
                </html:select>min
            </td>
        </tr>
        <tr>
            <th class="layout">State:</th>
            <td class="layout">
                <html:select name="timeActionForm" property="stateId">
                    <html:options collection="statePairs" property="integer" labelProperty="string"/>
                </html:select>
            </td>
        </tr>
        <tr>
            <th class="layout">Date:</th>
            <td class="layout">
                <html:select name="timeActionForm" property="year" size="1">
                    <html:options collection="years" property="integer" labelProperty="string"/>
                </html:select>-<html:select name="timeActionForm" property="month" size="1">
                    <html:options collection="months" property="integer" labelProperty="string"/>
                </html:select>-<html:select name="timeActionForm" property="day" size="1">
                    <html:options collection="days" property="integer" labelProperty="string"/>
                </html:select>
               Start:<html:select name="timeActionForm" property="startHour" size="1">
                    <html:options collection="hours" property="integer" labelProperty="string"/>
                </html:select>h:<html:select name="timeActionForm" property="startMinute" size="1">
                    <html:options collection="minutes" property="integer" labelProperty="string"/>
                </html:select>
                Stop:<html:select name="timeActionForm" property="stopHour" size="1">
                    <html:options collection="hours" property="integer" labelProperty="string"/>
                </html:select>h:<html:select name="timeActionForm" property="stopMinute" size="1">
                    <html:options collection="minutes" property="integer" labelProperty="string"/>
                </html:select>
            </td>
        </tr>
    </table>
    <div class="buttons">
        <html:submit property="btnSubmit" value="OK"/>
        <html:submit property="btnSubmit" value="Cancel"/>
    </div>
</html:form>
